package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 收货信息实体（用户模块）
 * </p>
 *
 * @author lhy
 * @since 2021-10-05
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("sys_sendInfo")
public class SendInfoBean extends Model {

    private static final long serialVersionUID = 1L;

    /**
     * 送货信息主键（自增）
     */
    @TableId(value = "sendInfoId", type = IdType.AUTO)
    private Integer sendInfoId;

    /**
     * 具体地址信息
     */
    @TableField("address")
    private String address;

    /**
     * 收货人
     */
    @TableField("receiver")
    private String receiver;

    /**
     * 收货人电话
     */
    @TableField("phone")
    private String phone;

    /**
     * 收货人性别
     */
    @TableField("gentle")
    private String gentle;

    /**
     * 用户外键
     */
    @TableField("userId")
    private Integer userId;

    /**
     * 是否是默认收货地址（默认为1，不是默认地址为0）
     */
    @TableField("defaultStatus")
    private Integer defaultStatus = 0;

    /**
     * 地理坐标
     */
    @TableField("coordinate")
    private String coordinate;

    public SendInfoBean() {
    }

    public SendInfoBean(String address, String receiver, String phone, String gentle, int userId) {
        this.address = address;
        this.receiver = receiver;
        this.phone = phone;
        this.gentle = gentle;
        this.userId = userId;

    }

    public SendInfoBean(String address, String receiver, String phone, String gentle, Integer userId, String coordinate) {

        this.address = address;
        this.receiver = receiver;
        this.phone = phone;
        this.gentle = gentle;
        this.userId = userId;
        this.defaultStatus = 0;
        this.coordinate = coordinate;
    }
}
